﻿using System;

namespace KBEngine
{
    public class Time
    {
        private static readonly DateTime beginTime = DateTime.Now;
        public static float unscaledTime { get => realtimeSinceStartup; }
        public static float realtimeSinceStartup { get => (float)(DateTime.Now.Subtract(beginTime).TotalMilliseconds / 1000); }
        public static float time { get => realtimeSinceStartup; }

        /// <summary>
        /// 每帧时间(秒)
        /// </summary>
        public static float deltaTime { get => (float)deltaMilliseconds / 1000; }
        /// <summary>
        /// 每帧时间（毫秒）
        /// </summary>
        public static int deltaMilliseconds { get => 20; }
    }
}
